package com.liao.badminton.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.liao.badminton.code.PageParam;
import com.liao.badminton.code.ProjectException;
import com.liao.badminton.code.ResponseRest;
import com.liao.badminton.dto.SystemRoleDto;
import com.liao.badminton.entity.SystemRole;
import com.liao.badminton.vo.SystemRoleVo;

import java.util.List;
import java.util.Set;

/**
 * @author liaocheng
 * @date 2023-11-22
 * description:角色信息表
 */
public interface SystemRoleService extends IService<SystemRole> {
    /**
     * 新增
     */
    ResponseRest saveSystemRole(SystemRoleDto param) throws ProjectException;

    /**
     * 删除
     */
    ResponseRest deletesSystemRole(SystemRoleDto param) throws ProjectException;

    /**
     * 修改
     */
    ResponseRest updateSystemRole(SystemRoleDto param) throws ProjectException;

    /**
     * 查询详情
     */
    SystemRoleVo findDetail(SystemRoleDto param) throws ProjectException;

    /**
     * 查询列表
     */
    ResponseRest findSystemRoleByPageParam(PageParam<SystemRoleDto> PageParam) throws ProjectException;


    boolean hasAnySuperAdmin(Set<Long> longs);

    List<String> findCodeByUserName(String userId);

    List<SystemRole> findByUserName(String userName);
}
